﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;
using DcsGauges.Shared.Exceptions;

namespace DcsGauges.Shared.DataStructures
{
    public class MinMaxGen<T>
    {
        public T                Min                 = default(T);
        public T                Max                 = default(T);

        public MinMaxGen(T min, T max)
        {
            this.Min            = min;
            this.Max            = max;
        }
    }

    public class MinMax : MinMaxGen<float>
    {
        public MinMax (float min, float max) : base(min, max)
	    {
            if(min >= max) throw new DcsArgumentException(Localization.ExcMinNeedsToBeSmalerThanMax);
            Contract.Ensures(this.Min == min && this.Max == max);
	    }
    }
}
